import request from '@/utils/request.js'
import {usetokenstore} from "@/stors/token.js";

export const loginService =(loginData)=>{
    const params=new URLSearchParams();
    for(let key in loginData){
        params.append(key,loginData[key])
    }
    return  request.post('/user/login',params)
}

export const mylistservice =(loginData)=>{
    const params = new URLSearchParams();
    for(let key in loginData){
        params.append(key,loginData[key])
    }
    return request.get('/user/mylist',params)
}

export const logout=()=>{
    return request.post("/user/logout")
}


export const  registerService=(userdata)=>{
    const params=new URLSearchParams();
    for(let key in userdata){
        params.append(key,userdata[key])
    }

    return request.post('/user/register',params)

//获取当前的用户信息
}